home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-104.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  42.5 KB  |  1,176 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Fri, 05 Jun 92       Volume 1 : Issue 104
  2.  
  3. Today's Topics:
  4.  
  5.     MacApp: documentation on ViewEdit
  6.     Is it possible to turn the monitor off & on from software?
  7.     (Urgent) Redirection with THINK Pascal
  8.     File Manager Blues
  9.     CTB Examples in C?
  10.     PD online references ?
  11.     IIfx ROM not 32 bit clean
  12.     Learn c on the mac
  13.     Hack to autocomment in Think C 5.0???
  14.     Q: Flip-wipe from one PICT to another
  15.     Repost: How to get Superdrive into MFM mode?
  16.     How can we "emulate" the Finder...?
  17.  
  18.  
  19. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  20.  
  21. These digests are available (by using FTP, account anonymous, your email
  22. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  23. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  24. Questions list.  The last several issues of the digest are available from
  25. sumex-aim.stanford.edu as well.
  26.  
  27. These digests are also available via email.  Just send a note saying that you
  28. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  29. automatically receive each new digest as it is created.
  30.  
  31. The digest is a collection of articles from the internet newsgroup comp.sys.
  32. mac.programmer.  It is designed for people who read c.s.m.p. semi-regularly
  33. and want an archive of the discussions.  If you don't know what a newsgroup
  34. is, you probably don't have access to it.  Ask your systems administrator(s)
  35. for details.  (This means you can't post questions to the digest.)
  36.  
  37. The articles in these digests are taken directly from comp.sys.mac.programmer.
  38. They are not edited; all articles included in this digest are in their original
  39. posted form.  The only articles that are -not- included in these digests are
  40. those which didn't receive any replies (except those that give information
  41. rather than ask a question).  All replies to each article are concatenated
  42. onto the original article in the order in which they were received.  Article
  43. threads are not added to the digests until the last article added to the
  44. thread is at least one month old (this is to ensure that the thread is dead
  45. before adding it to the digests).
  46.  
  47. Send administrative mail to mkelly@cs.uoregon.edu.
  48.  
  49. -------------------------------------------------------
  50.  
  51. From: speck@dat.ruc.dk (Peter Speck)
  52. Subject: MacApp: documentation on ViewEdit
  53. Date: 22 Apr 92 17:57:08 GMT
  54. Organization: Roskilde UniversitetsCenter
  55.  
  56. I cannot find any documentation on how
  57. to edit custion views in ViewEdit
  58. (for MacApp3.0).
  59. a) Eg. I have a class TSpecialEditText that
  60. doesn't have anything i the 'View' rsrc besides
  61. from the TEditText stuff
  62. b) I have addition stuff, want to specify it
  63. like TMPL in ResEdit or XCMDs.
  64.  
  65. Thanks,
  66. Peter Speck
  67.  
  68. +++++++++++++++++++++++++++
  69.  
  70. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  71. Organization: University of Illinois at Urbana
  72. Date: Wed, 22 Apr 1992 20:16:47 GMT
  73.  
  74. speck@dat.ruc.dk (Peter Speck) writes:
  75.  
  76. >I cannot find any documentation on how
  77. >to edit custion views in ViewEdit
  78. >(for MacApp3.0).
  79. >a) Eg. I have a class TSpecialEditText that
  80. >doesn't have anything i the 'View' rsrc besides
  81. >from the TEditText stuff
  82.  
  83. >b) I have addition stuff, want to specify it
  84. >like TMPL in ResEdit or XCMDs.
  85.  
  86. Well, all subclasses will have extra fields. The question is, do you want to
  87. read them in from the view resource (like the standard views do), or read them
  88. in and call explicit init routines in your code?
  89.  
  90. For "a", just do the usual trick of replacing the class name in ViewEdit with
  91. your subclasses name.
  92.  
  93. For "b"... ViewEdit 1.0 doesn't support writing out additional information. You
  94. can use Rez to write views, but it would mean diving into the rather kludgy way
  95. MacApp handles views (since Rez doesn't support subclassing), and Text-based
  96. views are pretty hard to rearrange. For MacApp 3.0/ViewEdit 3.0, you are given
  97. a single 4 byte space at the end of every view. At the moment I believe it's
  98. interpreted as a long, so you can stick a resource id in there or something.
  99. It's referenced as fUserBytes.
  100. - -- 
  101. Mark Lanett, Software Tools Group, NCSA; mlanett@uiuc.edu; NCSA.STG (AppleLink)
  102.  
  103. +++++++++++++++++++++++++++
  104.  
  105. From: Bruce.Hoult@bbs.actrix.gen.nz
  106. Organization: Actrix Information Exchange
  107. Date: Sun, 26 Apr 1992 04:56:28 GMT
  108.  
  109. In article <mlanett.703973807@void> mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
  110. > For "b"... ViewEdit 1.0 doesn't support writing out additional information. You
  111. > can use Rez to write views, but it would mean diving into the rather kludgy way
  112. > MacApp handles views (since Rez doesn't support subclassing), and Text-based
  113. > views are pretty hard to rearrange. For MacApp 3.0/ViewEdit 3.0, you are given
  114. > a single 4 byte space at the end of every view. At the moment I believe it's
  115. > interpreted as a long, so you can stick a resource id in there or something.
  116. > It's referenced as fUserBytes.
  117.  
  118. ViewEdit is just *crying* out to get user-defined view types via the
  119. new "Dinker" facility.  It would probably take less than a day to do
  120. it and if Apple don't have someone working on it they darned well should,
  121. IMNSHO.
  122. - -- 
  123. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  124. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  125. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  126. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  127.  
  128. +++++++++++++++++++++++++++
  129.  
  130. From: ksand@apple.com (Kent Sandvik)
  131. Date: 4 May 92 23:24:52 GMT
  132. Organization: MacDTS Mongols
  133.  
  134. In article <1992Apr26.045628.29705@actrix.gen.nz>, Bruce.Hoult@bbs.actrix.gen.nz
  135. writes:
  136. > In article <mlanett.703973807@void> mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  137. writes:
  138. > > 
  139. > > For "b"... ViewEdit 1.0 doesn't support writing out additional information.
  140. You
  141. > > can use Rez to write views, but it would mean diving into the rather kludgy
  142. way
  143. > > MacApp handles views (since Rez doesn't support subclassing), and Text-based
  144. > > views are pretty hard to rearrange. For MacApp 3.0/ViewEdit 3.0, you are
  145. given
  146. > > a single 4 byte space at the end of every view. At the moment I believe it's
  147. > > interpreted as a long, so you can stick a resource id in there or something.
  148. > > It's referenced as fUserBytes.
  149. > ViewEdit is just *crying* out to get user-defined view types via the
  150. > new "Dinker" facility.  It would probably take less than a day to do
  151. > it and if Apple don't have someone working on it they darned well should,
  152. > IMNSHO.
  153.  
  154. About ViewEdit, Dinker and so on, the World Wide Developer's Conference
  155. will have a couple of announcements about this all. Sorry, can't say anything
  156. until it's officially sanctioned.
  157.  
  158. Cheers,
  159. Kent Sandvik
  160. certainly not speaking for Apple just now!
  161.  
  162.  
  163. ---------------------------
  164.  
  165. From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
  166. Subject: Is it possible to turn the monitor off & on from software?
  167. Organization: University of Oregon Computer and Information Sciences Dept.
  168. Date: Thu, 23 Apr 1992 20:08:52 GMT
  169.  
  170.  
  171. The subject line says it all.  What do you think?
  172.  
  173. Mike.
  174. - -- 
  175. _____________________________________________________________________________
  176. Michael A. Kelly                                         University of Oregon
  177. mkelly@cs.uoregon.edu                             Computer Science Department
  178. _____________________________________________________________________________
  179.  
  180. +++++++++++++++++++++++++++
  181.  
  182. From: stevec@Apple.COM (Steve Christensen)
  183. Date: 5 May 92 01:32:59 GMT
  184. Organization: Apple Computer Inc., Cupertino, CA
  185.  
  186. mkelly@mystix.cs.uoregon.edu (Michael A. Kelly) writes:
  187.  
  188. >The subject line says it all.  What do you think?
  189.  
  190. Well, actually it may not.  Do you mean, "can you turn the monitor power
  191. on/off?" or "can you add/remove the part of the desktop associated with
  192. a particular monitor?"?  Two vastly different things.  For the first case,
  193. the answer is generally 'no' because most (all?) monitors have a physical
  194. power switch that can't be controlled by software.
  195.  
  196. For the second case, the answer is 'yes'...although you have great potential
  197. to make lots and lots of apps crash, especially in the case of removing part
  198. of the desktop.  Adding monitors to the desktop dynamically takes a bit of
  199. work to do correctly, but I don't know what apps won't work correctly when
  200. that happens...
  201.  
  202. steve
  203.  
  204. - -- 
  205. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  206.   Steve Christensen            Never hit a man with glasses.
  207.   stevec@apple.com            Hit him with a baseball bat.
  208.  
  209. ---------------------------
  210.  
  211. From: gt5870c@prism.gatech.EDU (007)
  212. Subject: (Urgent) Redirection with THINK Pascal
  213. Date: 2 May 92 21:35:29 GMT
  214. Organization: Universal Exports
  215.  
  216.  
  217.   Is there any way to redirect a text file as standard input similar to Unix's
  218. ProgName < TestData type redirection? Also how can I give the text window an
  219. EOF?
  220.  
  221. I am using THINK Pascal 3.0.2
  222.  
  223. Thanks in advance.
  224.  
  225.                 -Noah
  226.  
  227. +++++++++++++++++++++++++++
  228.  
  229. From: edw@caligula.cts.com (Ed Watkeys)
  230. Date: Sat, 2 May 92 23:26:56 EDT
  231. Organization: Distant Software
  232.  
  233.  
  234. In article <56402@hydra.gatech.EDU> (comp.sys.mac.programmer), gt5870c@prism.gatech.EDU (007) writes:
  235. >   Is there any way to redirect a text file as standard input similar to Unix's
  236. > ProgName < TestData type redirection? Also how can I give the text window an
  237. > EOF?
  238. > I am using THINK Pascal 3.0.2
  239. > Thanks in advance.
  240. >                 -Noah
  241. Go to the "Run Options..." or similar in the Run menu -- it allows you
  242. to send standard output to a file or the printer.
  243.  
  244. Your other problem was solved by running this program and experimenting...
  245.  
  246. program eoftest
  247. var s : string;
  248. begin
  249.   readln (s);
  250.   readln (s);
  251. end.
  252.  
  253. I ran it and hit common eof characters (^D, ^Z, ^C). ^C causes an "unexpected
  254. eof" error to occur -- it stops the first readln, as eof should, and bombs
  255. the second.
  256.  
  257. Ed
  258.  
  259. - --
  260. Ed Watkeys (Drexel U. Comp Sci)  "Moral judgement and condemnation is
  261. edw@caligula.cts.com              the favorite form of revenge for the
  262. edw%caligula@phlpa.pha.pa.us      spiritually limited on those who are
  263. ls.com!phlpa!caligula!edw         less so...." -- Friedrich Nietzsche
  264.  
  265. +++++++++++++++++++++++++++
  266.  
  267. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  268. Date: 3 May 92 23:16:21 GMT
  269. Organization: Symantec Corp.
  270.  
  271. >>>>> On Sat, 2 May 92 23:26:56 EDT, edw@caligula.cts.com (Ed Watkeys) said:
  272.  
  273.  > I ran it and hit common eof characters (^D, ^Z, ^C). ^C causes an
  274.  > "unexpected eof" error to occur -- it stops the first readln, as
  275.  > eof should, and bombs the second.
  276.  
  277. Try using the Enter key on the keypad, this signals an EOF in the
  278. correct fashion. I believe that the reason for this is that the
  279. charCode for the Enter key is 0x03, which is the same as Control-D and
  280. which is used to signal an EOF on UNIX systems.
  281.  
  282.     -phil
  283. - --
  284.    Phil Shapiro                                   Software Engineer
  285.    Language Products Group                     Symantec Corporation
  286.            Internet: phils@cs.brandeis.edu
  287.  
  288. +++++++++++++++++++++++++++
  289.  
  290. From: neeri@iis.ethz.ch (Matthias Neeracher)
  291. Organization: Integrated Systems Laboratory, ETH, Zurich
  292. Date: Mon, 4 May 1992 10:04:07 GMT
  293.  
  294. In article <PHILS.92May3181621@chaos.cs.brandeis.edu> phils@chaos.cs.brandeis.edu (Phil Shapiro) writes:
  295. >>>>>> On Sat, 2 May 92 23:26:56 EDT, edw@caligula.cts.com (Ed Watkeys) said:
  296. >
  297. > > I ran it and hit common eof characters (^D, ^Z, ^C). ^C causes an
  298. > > "unexpected eof" error to occur -- it stops the first readln, as
  299. > > eof should, and bombs the second.
  300. >
  301. >Try using the Enter key on the keypad, this signals an EOF in the
  302. >correct fashion.
  303.  
  304. Probably correct...
  305.  
  306. >I believe that the reason for this is that the
  307. >charCode for the Enter key is 0x03, which is the same as Control-D and
  308. >which is used to signal an EOF on UNIX systems.
  309.  
  310. ... but this explanation is incorrect. Control-D is 0x04. 
  311.  
  312. Matthias
  313.  
  314. - -----
  315. Matthias Neeracher                                   neeri@iis.ethz.ch
  316.  "You must have picked up that copy of Scarlett instead of Inside Mac
  317.   when you tried to find the right call..." -- Keith Rollin
  318.  
  319. ---------------------------
  320.  
  321. From: heddle@clas01.cebaf.gov (David Heddle)
  322. Subject: File Manager Blues
  323. Organization: CEBAF (Continuous Electron Beam Accelerator Facility)
  324. Date: Sun, 3 May 1992 00:34:24 GMT
  325.  
  326. Dear Friends:
  327.  
  328. Apologies for what must be a set of FAQs. However, I am stuggling to understand
  329. the file manager. Here are my questions:
  330.  
  331. 1) What is the definition of a "working" directory? Is it equivalent to
  332. what  "pwd" would
  333.     give me in Unix or what "SHOW DEFAULT" would give me in VMS?
  334.  
  335. 2) Assuming that the working directory is as implied by an affirmative
  336. response to
  337.     the previous question, what does it mean to "create"  (or is it
  338. "open", I don't have
  339.    IM IV at hand) a working directory? Is that equivalant to "cd" (unix)
  340. or "SET DEFAULT"
  341.   VMS? If so, what about the previous Working Directory?? Is there only
  342. one at a time?
  343.  
  344. Questions 3-5 are practical in nature:
  345.  
  346. 3) How do I get an ID for the present Working Directory? The things that
  347. I have tried
  348.     seem to give me only the ID of the root (i.e. the hard disk )
  349.  
  350. 4) How do I get the names (partial path) of all the files and  folders
  351. (but no their
  352.     contents -- i.e. just the folder names) of the present working
  353. directory?
  354.  
  355. 5) How can I find the ID of the parent and the IDs of the offspring of the
  356.     present working directory?
  357.  
  358.  
  359. Any help is greatly appreciated! The real bottom line is that, while iI
  360. have no doubt
  361. that the fault is mine, I  cannot feel comfortable with the File Manager
  362. chapter
  363. in IM IV.
  364.  
  365. dph
  366.  
  367. +++++++++++++++++++++++++++
  368.  
  369. From: dougm@cns.caltech.edu (Doug McNaught)
  370. Date: 3 May 92 06:20:25 GMT
  371. Organization: California Institute of Technology
  372.  
  373. In article <1992May3.003424.7923@murdoch.acc.Virginia.EDU> heddle@clas01.cebaf.gov (David Heddle) writes:
  374.  
  375.  
  376.    Dear Friends
  377.  
  378.    Apologies for what must be a set of FAQs. However, I am stuggling to understand
  379.    the file manager. Here are my questions:
  380.  
  381.    1) What is the definition of a "working" directory? Is it equivalent to
  382.    what  "pwd" would
  383.        give me in Unix or what "SHOW DEFAULT" would give me in VMS?
  384.  
  385. Working directories are a hack for backward compatibility with non-HFS
  386. aware programs. They're still around because the pre-system 7 Standard
  387. File Package creates them when a file is selected. 
  388.  
  389.    2) Assuming that the working directory is as implied by an affirmative
  390.    response to
  391.        the previous question, what does it mean to "create"  (or is it
  392.    "open", I don't have
  393.       IM IV at hand) a working directory? Is that equivalant to "cd" (unix)
  394.    or "SET DEFAULT"
  395.      VMS? If so, what about the previous Working Directory?? Is there only
  396.    one at a time?
  397.  
  398. There's no reason to open a WD yourself. The way backward
  399. compatibility is maintained is that WD reference numbers can always be
  400. used in place of volume reference numbers in the old File Manager
  401. calls. So, when the user chooses a file with SFGetFile, the SF
  402. package creates a WD and passes its refNum back to your program, which
  403. can use it just like a vRefNum. There really isn't a Unix-style cwd
  404. since all the File Manager calls to create, open, and stat files take
  405. a name and a v(WD)RefNum. 
  406.  
  407.    Questions 3-5 are practical in nature:
  408.  
  409.    3) How do I get an ID for the present Working Directory? The things that
  410.    I have tried
  411.        seem to give me only the ID of the root (i.e. the hard disk )
  412.  
  413. What have you tried? By ID do you mean a WDRefNum or a dirID (they're
  414. two different things). Again, there isn't really a cwd in the Unix
  415. sense. If you want to find out the directory that your app started
  416. from, that can be done--I think (not sure) that GetVol at startup will
  417. return a WDRefNum for you. 
  418.  
  419.    4) How do I get the names (partial path) of all the files and  folders
  420.    (but no their
  421.        contents -- i.e. just the folder names) of the present working
  422.    directory?
  423.  
  424. There are two ways. The simplest conceptually is to call PBGetCatInfo
  425. on your working directory using the ioFDirIndex field of the
  426. CInfoPBRec, after first getting the 'valence' of the directory itself
  427. with another call to PBGetCatInfo. The indexing calls will return info
  428. about each object in the directory, including whether it's a file or a
  429. directory, the size (for files), creation and modification dates, etc.
  430. It'll also return the name of the object (file or directory).
  431.  
  432.    5) How can I find the ID of the parent and the IDs of the offspring of the
  433.        present working directory?
  434.  
  435. PBGetCatInfo again.
  436.  
  437.    Any help is greatly appreciated! The real bottom line is that, while iI
  438.    have no doubt
  439.    that the fault is mine, I  cannot feel comfortable with the File Manager
  440.    chapter
  441.    in IM IV.
  442.  
  443. That chapter is a bear! I've struggled with this stuff recently, so
  444. mail me if you have questions or want sample code. I decided to go
  445. ahead and post instead of mailing you because this is something that a
  446. lot of people have trouble with. Other good references are the FAQ
  447. list available by ftp from ftp.cs.uoregon.edu, and the Usenet Mac
  448. Programmer's Guide, available at Sumex, as well as the excellent
  449. sample code and TechNotes at ftp.apple.com.
  450.  
  451. - -doug
  452. - --
  453. Doug McNaught              |"Sadder still to watch it die/ Then never to have
  454. dougm@cns.caltech.edu      | known it/ For you, the blind who once could see/
  455. mcnaught@midget.towson.edu | The bell tolls for thee..." --Neil Peart
  456.   Nobody approves my opinions! Not even me, sometimes. Read at your own risk.
  457.  
  458. +++++++++++++++++++++++++++
  459.  
  460. From: russotto@eng.umd.edu (Matthew T. Russotto)
  461. Date: Mon, 04 May 92 14:23:54 GMT
  462. Organization: College of Engineering, University of Maryland, College Park
  463.  
  464. In article <1992May3.003424.7923@murdoch.acc.Virginia.EDU> heddle@clas01.cebaf.gov (David Heddle) writes:
  465. >Dear Friends:
  466. >
  467. >Apologies for what must be a set of FAQs. However, I am stuggling to understand
  468. >the file manager. Here are my questions:
  469. >
  470. >1) What is the definition of a "working" directory? Is it equivalent to
  471. >what  "pwd" would
  472. >    give me in Unix or what "SHOW DEFAULT" would give me in VMS?
  473.  
  474. No-- a 'working directory' is a structure which looks like a separate
  475. volume to old file manager calls.  It is there to allow compatibility
  476. between MFS (flat file directory) and HFS
  477.  
  478. >Questions 3-5 are practical in nature:
  479. >
  480. >3) How do I get an ID for the present Working Directory? The things that
  481. >I have tried
  482. >    seem to give me only the ID of the root (i.e. the hard disk )
  483.  
  484. HGetVol will get you the reference number of the current volume, plus
  485. the directory ID of the current directory.  That is enough to fully
  486. specify the current directory
  487.  
  488. >4) How do I get the names (partial path) of all the files and  folders
  489. >(but no their
  490. >    contents -- i.e. just the folder names) of the present working
  491. >directory?
  492.  
  493. Use GetCatInfo in indexed mode.  Set DirID and vRefNum to 0 to use the
  494. default directory.
  495.  
  496. >
  497. >5) How can I find the ID of the parent and the IDs of the offspring of the
  498. >    present working directory?
  499.  
  500. GetCatInfo again.
  501.  
  502.  
  503. - -- 
  504. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  505. Some news readers expect "Disclaimer:" here.
  506. Just say NO to police searches and seizures.  Make them use force.
  507. (not responsible for bodily harm resulting from following above advice)
  508.  
  509. ---------------------------
  510.  
  511. From: rhessjr@west.darkside.com (Robert Hess)
  512. Subject: CTB Examples in C?
  513. Date: 1 May 92 00:02:22 GMT
  514. Organization: Independent Consultant
  515.  
  516. Anyone know where I can find some CTB examples written in C? I looked on
  517. ftp.apple.com and found a couple of things but I'd like more. MUCH more.
  518.  
  519. I can't ftp, so if someone could send stuff to me I'd really appreciate it.
  520.  
  521. Robert Hess
  522. AppleLink:ENDPOINT
  523. AOL:RHessJr
  524. CIS:71641,1376
  525.  
  526. +++++++++++++++++++++++++++
  527.  
  528. From: mspace@netcom.com (Brian Hall)
  529. Date: 1 May 92 02:28:43 GMT
  530. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  531.  
  532. rhessjr@west.darkside.com (Robert Hess) writes:
  533.  
  534. >Anyone know where I can find some CTB examples written in C? I looked on
  535. >ftp.apple.com and found a couple of things but I'd like more. MUCH more.
  536.  
  537. >I can't ftp, so if someone could send stuff to me I'd really appreciate it.
  538.  
  539. >Robert Hess
  540. >AppleLink:ENDPOINT
  541. >AOL:RHessJr
  542. >CIS:71641,1376
  543.  
  544. APDA sells some examples, and if you *really* want to spend some money,
  545. it is possible to license the source to MacTerminal for some thousands
  546. of dollars - contact SW.LICENSING on AppleLink for more info on that.
  547.  
  548. - -- 
  549.  
  550.  \ | /   | Brian Hall                 mspace@netcom.com
  551.  - : -   | Mark/Space Softworks       Applelink: markspace
  552.   /|\    |                            America Online: MarkSpace
  553.  |-+-|   |
  554. /-\|/-\  | People don't kill people, toasters kill people.
  555.  
  556. +++++++++++++++++++++++++++
  557.  
  558. From: paul@cthq.UUCP (Paul G. Smith)
  559. Date: 1 May 92 19:03:49 GMT
  560. Organization: CommsTalk HQ
  561.  
  562.  
  563. In article <3j-k=wh.mspace@netcom.com> (comp.sys.mac.programmer), mspace@netcom.com (Brian Hall) writes:
  564. > APDA sells some examples, and if you *really* want to spend some money,
  565. > it is possible to license the source to MacTerminal for some thousands
  566. > of dollars - contact SW.LICENSING on AppleLink for more info on that.
  567.  
  568. Yes, but... the source code examples APDA sells are written in Pascal. The
  569. source to MacTerminal 3 is in Pascal too - MacTerminal 3 is based on MacApp
  570. 2.0 and all the source code is Object Pascal.
  571.  
  572. One small C example is within SuperSurfer, a modified version of the APDA-
  573. distributed CTB example program. Unfortunately, only a few small bits (mostly
  574. the parts dealing with the terminal window scrollback area) are written
  575. in C: the remainder is a hacked copy of the original Pascal program.
  576.  
  577. You might try to look for the 'Sessions' demo, one of the System 7 example
  578. projects (James Beninghaus of Mac DTS was the author, I think). It is on
  579. some of the Developer CDs, and may be on Apple's FTP server. This was (if
  580. I remember right - I've not looked at it for a long time) written in C++.
  581.  
  582. best regards, Paul
  583.  
  584. - -------------------------------------
  585. Paul G Smith / CommsTalk HQ
  586. INTERNET:  "paul@cthq.uucp"            CIX:  "pgsmith"
  587. AppleLink: "commstalk.hq" ("commstalk.hq@applelink.apple.com")
  588. tel/fax:   + 44 491 574295  (dial 11 on 2nd dial tone for fax)
  589. snail:    40 St Marks Road, Henley-on-Thames, Oxon. RG9 1LW. UK
  590.  
  591. +++++++++++++++++++++++++++
  592.  
  593. From: peterc@moebius.cubetech.com (Peter Creath)
  594. Date: 3 May 92 23:03:44 GMT
  595. Organization: Cube Technologies
  596.  
  597.  
  598. In article <D2150057.2ekkod@cthq.UUCP> (comp.sys.mac.programmer), paul@cthq.UUCP (Paul G. Smith) writes:
  599. > In article <3j-k=wh.mspace@netcom.com> (comp.sys.mac.programmer), mspace@netcom.com (Brian Hall) writes:
  600. > > APDA sells some examples, and if you *really* want to spend some money,
  601. > > it is possible to license the source to MacTerminal for some thousands
  602. > > of dollars - contact SW.LICENSING on AppleLink for more info on that.
  603. >
  604. > One small C example is within SuperSurfer, a modified version of the APDA-
  605. > distributed CTB example program. Unfortunately, only a few small bits (mostly
  606. > the parts dealing with the terminal window scrollback area) are written
  607. > in C: the remainder is a hacked copy of the original Pascal program.
  608.  
  609. Also, Terminal 2.0 and 2.2 (both written in C and distributed with
  610. source code) are able to utilize the Comm Toolbox.  They should be
  611. up on sumex.
  612.  
  613. - ----------------------------------------------------------------------------
  614. Peter Creath                 "When I was a boy I was told that anybody could
  615. peterc@moebius.cubetech.com   become president; I'm beginning to believe it."
  616.                                                            -- Clarence Darrow
  617.  
  618. +++++++++++++++++++++++++++
  619.  
  620. From: jess@gn.ecn.purdue.edu (Jess M Holle)
  621. Date: 4 May 92 23:45:42 GMT
  622. Organization: Purdue University Engineering Computer Network
  623.  
  624. I may have missed someone mentioning this, but are there any freely
  625. available (via ftp) sample programs written in C that use the
  626. terminal manager portion of the CTB?
  627.  
  628. Thanks,
  629. Jess Holle
  630.  
  631. ---------------------------
  632.  
  633. From: mrichard@watserv1.waterloo.edu (Mark P. Richards)
  634. Subject: PD online references ?
  635. Date: 4 May 92 15:27:39 GMT
  636. Organization: University of Waterloo
  637.  
  638. I am aware of two online reference programmes for the ToolBox:
  639. Think C Reference, and Online Companion.  Does anyone know about
  640. a public domain online reference programme ?  And if not, which
  641. of these two is the best ?
  642.  
  643. +++++++++++++++++++++++++++
  644.  
  645. From: leonardr@ccs.itd.umich.edu
  646. Date: 4 May 92 16:29:56 GMT
  647. Organization: Campus Computing Sites, University of Michigan-Ann Arbor
  648.  
  649. In article <1992May4.152739.26447@watserv1.waterloo.edu> mrichard@watserv1.waterloo.edu (Mark P. Richards) writes:
  650. >I am aware of two online reference programmes for the ToolBox:
  651. >Think C Reference, and Online Companion.  Does anyone know about
  652. >a public domain online reference programme ?  And if not, which
  653. >of these two is the best ?
  654. >
  655.     Apple provides as a set of Hypercard stacks called "Spinside Mac"
  656. which offer "online" reference to all of Inside Mac volumes I-VI.  If you
  657. don't mind giving up the disk space & memory that these require, they work
  658. pretty well.
  659.  
  660.     I, on the other hand, prefer using the other tools you mentioned 
  661. along with 411 (when I'm in MPW).  Programmer's Online Companion is GREAT
  662. since usually I just need a parameter list to a call (that's all you get,
  663. along with structs, etc.).  If I need more information, then I turn to
  664. Think Reference to see if I can find whgat I need there - also VERY useful
  665. on my PowerBook when I'm on a plane.  
  666.  
  667.     Just my opinion....
  668.  
  669.  
  670. - -- 
  671. - -----------------------------------------------------------------------
  672. Leonard Rosenthol          Internet: leonardr@ccs.itd.umich.edu
  673. Director of Advanced Technology   AppleLink: MACgician
  674. Aladdin Systems, inc.          GEnie:     MACgician
  675.  
  676. ---------------------------
  677.  
  678. From: Henry_Van_Tunen@mindlink.bc.ca (Henry Van Tunen)
  679. Subject: IIfx ROM not 32 bit clean
  680. Date: 1 May 92 00:50:09 GMT
  681. Organization: MIND LINK! - British Columbia, Canada
  682.  
  683. While testing my app, a bus error occurred when I tried to use the contents of
  684. the low memory global "CurActivate". The value stored there looked like it had
  685. the high bit set. Using MacsBug, I step spied that location and "discovered"
  686. the following code in the Macintosh IIfx ROM:
  687.  
  688.  Disassembling from 40815C54 (Macintosh IIfx ROM)
  689.   _TickCount
  690.      +025E  40815C5C   LSR.W      #$1,D0
  691.      +0260  40815C5E   BCC.S      _TickCount+0270
  692.      +0262  40815C60   BSET       #$07,CurActivate   <<< ouch!
  693.      +0268  40815C66   MOVEQ      #$FF,D1
  694.      +026A  40815C68   RTS
  695.  
  696. As you can see, at address $40815C60, it is setting the high bit of
  697. CurActivate! My guess is the Window Manager is using this bit as a flag.
  698.  
  699. This bug only happens when you try to use CurActivate when you are processing
  700. a suspend/resume event. All other times, the value stored there seems to be
  701. OK.
  702.  
  703. I know I shouldn't be mucking with low memory globals so I have modified my
  704. code accordingly. My concern was that there might be other little "features"
  705. like this waiting to bite someone.
  706.  
  707. To summarize, this means the ROMs in the IIfx aren't true 32 bit clean. This
  708. same problem exists on the IIsi and IIcx (which I believe isn't 32 bit clean
  709. anyway).
  710.  
  711. I am running System 7.0 and TuneUp 1.1.1 on a Mac IIfx, 8 Meg RAM
  712.  
  713. +++++++++++++++++++++++++++
  714.  
  715. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  716. Date: 1 May 92 17:51:31 +1200
  717. Organization: University of Waikato, Hamilton, New Zealand
  718.  
  719. In article <11756@mindlink.bc.ca>, Henry_Van_Tunen@mindlink.bc.ca (Henry Van Tunen) writes:
  720. >      +0262  40815C60   BSET       #$07,CurActivate   <<< ouch!
  721.  
  722. Granted that might not be a 32-bit-clean thing to do, but it is at least
  723. 31-bit-clean, and I assume that there is code in Get/WaitNextEvent to
  724. strip off this bit before returning the window address.
  725.  
  726. I recall some Apple people quoting the maximum addressable memory in
  727. 32-bit-clean systems as 2GB rather than 4GB. This may be one of the
  728. reasons. Another reason would be all those applications inadvertently
  729. using signed instead of unsigned comparisons on block sizes, so as soon
  730. as one of them runs on a machine with more than 2GB of available memory,
  731. it's going to fail with a "not enough memory" error!
  732.  
  733. On the other hand, are you running in 32-bit mode? If not, maybe the Toolbox
  734. does something different in that situation.
  735.  
  736. Lawrence
  737. who knows that, as soon as he reaches the stage where 2GB of memory
  738. isn't enough, it'll be the end of the 32-bit era.
  739.  
  740. +++++++++++++++++++++++++++
  741.  
  742. From: stevec@Apple.COM (Steve Christensen)
  743. Date: 5 May 92 02:33:55 GMT
  744. Organization: Apple Computer Inc., Cupertino, CA
  745.  
  746. Henry_Van_Tunen@mindlink.bc.ca (Henry Van Tunen) writes:
  747.  
  748. >While testing my app, a bus error occurred when I tried to use the contents of
  749. >the low memory global "CurActivate". The value stored there looked like it had
  750. >the high bit set...
  751. >...  My guess is the Window Manager is using this bit as a flag.
  752.  
  753. >From looking at the source code (which is in the Event Manager, by the way),
  754. that bit is only being set when an activateEvt for that window has been
  755. generated, so that WindowPtr is no longer valid nor used by the system.
  756.  
  757. >To summarize, this means the ROMs in the IIfx aren't true 32 bit clean. This
  758. >same problem exists on the IIsi and IIcx (which I believe isn't 32 bit clean
  759. >anyway).
  760.  
  761. Well, yes and no.  This could be a problem if you had a system with more than
  762. 2GB installed and the window data structure was stored in memory above the
  763. 2GB mark.  In that case the OS would have a problem handling window activations
  764. and deactivations, but it wouldn't crash.  For all other cases it will work
  765. correctly because the only time that bit is set is when the OS is done with
  766. that address and will not use it further.  For this case, the ROM is "31-bit
  767. clean", although in general the ROM really is 32-bit clean...
  768.  
  769. steve
  770.  
  771. - -- 
  772. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  773.   Steve Christensen            Never hit a man with glasses.
  774.   stevec@apple.com            Hit him with a baseball bat.
  775.  
  776. ---------------------------
  777.  
  778. From: buzman@uuisis.isis.org (georges milette)
  779. Subject: Learn c on the mac
  780. Organization: International Shared Information Service (Ottawa)
  781. Date: Mon, 04 May 92 14:49:29 GMT
  782.  
  783. Anyone knows the answer on page 140 , exercise 2 and 3 in dave mark's boos
  784. "learn C on the Macintosh. I've asked this question on many BBS's and
  785. all I've gotten so far are other codes that gives me prime numbers..I know
  786. there's even some others later in the book (the disquette is included 
  787. with a demo version of think c called thin c). I'd like the solution to
  788. THESE EXERCISES, not another alternate prime number code.
  789.         Any answer concerning this one will be greatly appreciated..
  790. Thanks
  791.  
  792.  
  793. +++++++++++++++++++++++++++
  794.  
  795. From: bskendig@light.Princeton.EDU (Brian Kendig)
  796. Date: 4 May 92 19:23:34 GMT
  797. Organization: Starfleet Academy, Princeton University
  798.  
  799. In article <sc99JB1w164w@uuisis.isis.org> buzman@uuisis.isis.org (georges milette) writes:
  800. >Anyone knows the answer on page 140 , exercise 2 and 3 in dave mark's boos
  801. >"learn C on the Macintosh.
  802.  
  803. Well, I don't know the answer, but then again I'm not just anyone. ;)
  804. Could you post the question here, so I can take a jab at it?
  805.  
  806.      << Brian >>
  807.  
  808. - -- 
  809. | Brian S. Kendig       --/\-- Tri     bskendig@phoenix.Princeton.EDU, @PUCC
  810. | Computer Science BSE  |/  \| Quad  You gave your life to become the person
  811. | Princeton University  /____\ clubs    you are right now.  Was it worth it?
  812.  
  813. ---------------------------
  814.  
  815. From: jonke@kong.gsfc.nasa.gov (Stephen Jonke)
  816. Subject: Hack to autocomment in Think C 5.0???
  817. Date: 1 May 92 19:30:45 GMT
  818. Organization: NASA Goddard Space Flight Center
  819.  
  820. Is there a hack in existence that gives you a command key (or
  821. preferably a menu item with a keyboard shortcut) that will
  822. automatically comment out the selected lines in a source file while
  823. using Think C 5.0?  I seem to recall that Think Pascal had a menu
  824. item that would do this, but it seems to be missing in Think C.
  825.  
  826. Even if it were a stupid hack, such that it didn't pay attention to
  827. see if there were any comments within the selected lines, it would
  828. still be a useful thing.
  829.  
  830. PLEASE E-MAIL ALL RESPONSES!  EITHER REPLY TO THIS MESSAGE VIA EMAIL,
  831. OR SEND MAIL TO:  jonke@kong.gsfsc.nasa.gov
  832.  
  833. Steve
  834.  
  835. +++++++++++++++++++++++++++
  836.  
  837. From: haynes@mace.cc.purdue.edu (Carl W. Haynes III)
  838. Date: 1 May 92 23:27:41 GMT
  839. Organization: Purdue University Computing Center
  840.  
  841. In article <1992May1.193045.18613@kong.gsfc.nasa.gov> jonke@kong.gsfc.nasa.gov (Stephen Jonke) writes:
  842. >Is there a hack in existence that gives you a command key (or
  843. >preferably a menu item with a keyboard shortcut) that will
  844. >automatically comment out the selected lines in a source file while
  845. >using Think C 5.0?  I seem to recall that Think Pascal had a menu
  846. >item that would do this, but it seems to be missing in Think C.
  847.  
  848. PopUpFuncs has a command to let you do this. It is a commercial
  849. add-on to Think C (and MPW, I think) whose main purpose is to
  850. provide you with a menu of functions in your unit. (the same idea
  851. as cmd-clicking the title bar in Think Pascal).
  852.  
  853. I think it's about $45.00 from
  854. SciComp Software
  855. 1-800-522-5939
  856. 2912 Claremont Ave. #21
  857. Berkeley, CA 94705
  858.  
  859. carl
  860. haynes@mace.cc.purdue.edu
  861. AOL: CWH3
  862.  
  863.  
  864. +++++++++++++++++++++++++++
  865.  
  866. From: Laurie Kirchmeier <laurence.kirchmeier@umich.edu>
  867. Organization: Office of Instructional Tech./ Univ of Michigan
  868. Date: Mon, 4 May 92 13:58:04 GMT
  869.  
  870. CMaster is another commercial extender for THINK-C which does
  871. autocommenting and
  872. much much more. It's cost about $80 and is available from 
  873.   
  874.   Jersey Scientific
  875.   545 Eighth Ave
  876.   New York NY 10018
  877.   Tel. 121 736-0406
  878.  
  879. +++++++++++++++++++++++++++
  880.  
  881. From: Laurie Kirchmeier <laurence.kirchmeier@umich.edu>
  882. Organization: Office of Instructional Tech./ Univ of Michigan
  883. Date: Mon, 4 May 92 13:57:08 GMT
  884.  
  885. CMaster is another commercial extender for THINK-C which does
  886. autocommenting and
  887. much much more. It's cost about $80 and is available from 
  888.   
  889.   Jersey Scientific
  890.   545 Eighth Ave
  891.   New York NY 10018
  892.   Tel. 121 736-0406
  893.  
  894. ---------------------------
  895.  
  896. From: felciano@medisg.stanford.edu (Ramon M. Felciano)
  897. Subject: Q: Flip-wipe from one PICT to another
  898. Date: 5 May 92 00:00:46 GMT
  899. Organization: SUMMIT (Stanford Univ. Medical Media and Information
  900.  
  901.  
  902. Hi!
  903.  
  904. I'm trying to make an About box that does a wipe transition from one
  905. color PICT to another. I'd like to do a simple horizontal or vertical
  906. flip (looks like you're flipping a card over). Does anyone know how to do
  907. this, or know where I might find some sample code?
  908.  
  909. I know the book "Graphics Gems Vol 1" describes a way to do a fade in,
  910. but I haven't found anything on this kind of flipping.
  911.  
  912. Ramon M. Felciano
  913. Associate Director, SUMMIT
  914. Stanford University Medical Media and Information Technologies
  915.  
  916. +++++++++++++++++++++++++++
  917.  
  918. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  919. Date: 6 May 92 00:54:37 GMT
  920. Organization: University of Waikato, Hamilton, New Zealand
  921.  
  922. Can you explain a bit more about the sort of effect you're trying to achieve?
  923. I can think of three possibilities. Assume the first image is represented
  924. by "123456789" and the second one by "ABCDEFGHI", which of the following
  925. four sequences represents the effect you want?
  926.  
  927. Wipe:
  928.  
  929.     123456789
  930.     123456GHI
  931.     123DEFGHI
  932.     ABCDEFGHI
  933.  
  934. Scroll on:
  935.  
  936.     123456789
  937.     123456ABC
  938.     123ABCDEF
  939.     ABCDEFGHI
  940.  
  941. Scroll off:
  942.  
  943.     123456789
  944.     456789GHI
  945.     789DEFGHI
  946.     ABCDEFGHI
  947.  
  948. Push:
  949.  
  950.     123456789
  951.     456789ABC
  952.     789ABCDEF
  953.     ABCDEFGHI
  954.  
  955. A sort of "peeling off" effect (Premiere calls this "Roll Away"):
  956.  
  957.     123456789
  958.     123987GHI
  959.     654DEFGHI
  960.     ABCDEFGHI
  961.  
  962. Actually there are other variations possible (besides the obvious horizontal
  963. reversals of the above effects), but these five seem the most reasonable ones.
  964. The first four are pretty easy to do with just a few QuickDraw calls; the last
  965. one is more work, because it involves flipping the pixels around.
  966.  
  967. So, which of the six was it you wanted?
  968.  
  969. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  970. Computer Services Dept                     fax: +64-7-838-4066
  971. University of Waikato            electric mail: ldo@waikato.ac.nz
  972. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  973. There are two types of people in the world: those who divide people into
  974. two types, those who don't, and those who can't count.
  975.  
  976. +++++++++++++++++++++++++++
  977.  
  978. From: CXT105@psuvm.psu.edu (Christopher Tate)
  979. Date: 5 May 92 04:10:13 GMT
  980. Organization: Penn State University
  981.  
  982. In article <1992May5.000046.1713@leland.Stanford.EDU>,
  983. felciano@medisg.stanford.edu (Ramon M. Felciano) says:
  984. >
  985. >I'm trying to make an About box that does a wipe transition from one
  986. >color PICT to another. I'd like to do a simple horizontal or vertical
  987. >flip (looks like you're flipping a card over). Does anyone know how to do
  988. >this, or know where I might find some sample code?
  989.  
  990. How 'bout just set up offscreen buffers (GWorlds are your friend!) to
  991. hold images of each "side" of the card, and then successively CopyBits()
  992. the image into narrower and narrower rectangles, erasing the outside
  993. edge as you go?
  994.  
  995. (Based on the fact that the flat projection of a card seen at a non-
  996. orthogonal angle looks "compressed" -- you're just getting CopyBits() to
  997. do your compression for you.)
  998.  
  999. - -------
  1000. Christopher Tate     | Cryptogram #25:
  1001. cxt105@psuvm.psu.edu |
  1002. CXT105@PSUVM.BITNET  | "AUBE IBPB CQHA JPGYZMPE NJHAXBZ, SJZG JS
  1003. - ---------------------|  IMWFYZK MZG GJKH MZG *VUPYHAXMH MZG AUB HZJI."
  1004. "*" == proper nouns  |             -- "M VUYWG'H *VUPYHAXMH YZ *IMWBH"
  1005.  
  1006. ---------------------------
  1007.  
  1008. From: swb1_ltd@uhura.cc.rochester.edu (Steve Berkley)
  1009. Subject: Repost: How to get Superdrive into MFM mode?
  1010. Date: 2 May 92 02:31:40 GMT
  1011. Organization: University of Rochester - Rochester, New York
  1012.  
  1013. I got no response in the last couple of weeks so I thought I'd 
  1014. repost my question:
  1015.  
  1016. I am writing a disk imaging program that reads in IBM/Ensoniq
  1017. diskettes (10 sectors per track).  The reads to the sectors are
  1018. accomplished with PBRead, but the diskettes are being read in at
  1019. 8-12 sectors per track, according to apple's floppy scheme.
  1020. I need to know what call or control to use to get the superdrive
  1021. to kick into MFM mode, reading and writing at 10 sectors per track.
  1022. Any information on detection of a Superdrive would be appreciated
  1023. as well.  I could not find anything on this in the Apple Tech Notes,
  1024. nor in IM I-V.
  1025.  
  1026. - -Steve Berkley
  1027. swb1_ltd@uhura.cc.rochester.edu
  1028.  
  1029. +++++++++++++++++++++++++++
  1030.  
  1031. From: russotto@eng.umd.edu (Matthew T. Russotto)
  1032. Date: Mon, 04 May 92 14:16:36 GMT
  1033. Organization: College of Engineering, University of Maryland, College Park
  1034.  
  1035. In article <1992May2.023140.24799@galileo.cc.rochester.edu> swb1_ltd@uhura.cc.rochester.edu (Steve Berkley) writes:
  1036. >I got no response in the last couple of weeks so I thought I'd 
  1037. >repost my question:
  1038. >
  1039. >I am writing a disk imaging program that reads in IBM/Ensoniq
  1040. >diskettes (10 sectors per track).  The reads to the sectors are
  1041. >accomplished with PBRead, but the diskettes are being read in at
  1042. >8-12 sectors per track, according to apple's floppy scheme.
  1043. >I need to know what call or control to use to get the superdrive
  1044. >to kick into MFM mode, reading and writing at 10 sectors per track.
  1045. >Any information on detection of a Superdrive would be appreciated
  1046. >as well.  I could not find anything on this in the Apple Tech Notes,
  1047. >nor in IM I-V.
  1048.  
  1049. Hmm, I thought I responded to this:  the tech note "What your .Sony
  1050. drives for you" tells you how to detect a SuperDrive.  I don't know
  1051. how to force one to MFM mode, but if you are successfully reading from
  1052. the disk at all you ARE in MFM mode.  
  1053.  
  1054.  
  1055. - -- 
  1056. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  1057. Some news readers expect "Disclaimer:" here.
  1058. Just say NO to police searches and seizures.  Make them use force.
  1059. (not responsible for bodily harm resulting from following above advice)
  1060.  
  1061. ---------------------------
  1062.  
  1063. From: jovanovi@studsys.mscs.mu.edu (Steve Jovanovic)
  1064. Subject: How can we "emulate" the Finder...?
  1065. Date: 27 Apr 92 21:18:19 GMT
  1066. Organization: Marquette University - Department MSCS
  1067.  
  1068. Hi Netters,
  1069.  
  1070. Does anyone know how the Finder implements iconic views, and
  1071. allows users to drag icons?  First, does the Finder use 
  1072. GWorlds to keep track of each window's pixMap, so that fast
  1073. scrolling is no problem?  Or...does it keep track of the 
  1074. position of each individual icon, and uses CopyBits() to
  1075. draw all of the icons in a window?  
  1076.  
  1077. Related to this is how the Finder can tell when a user has
  1078. clicked on an icon.  BitMapInRegion()?  
  1079.  
  1080. I'm developing a UI for the FilterTop project in which I'd
  1081. like to do some of the same types of things that the Finder
  1082. does, but I'm not sure how best to approach it.  I think using
  1083. GWorlds would cause a problem if users are running FT on a 24-
  1084. bit system.  Also, speed is an important concern.
  1085.  
  1086. Any advice greatly appreciated!  I'll summarize all responses.
  1087.  
  1088. Thanks for your time :-)
  1089.  
  1090. steve
  1091.  
  1092.  
  1093.  
  1094. - -- 
  1095. +----------------------+---------------------------+--------------------------+
  1096. | Steve Jovanovic      | Internet:  stevej@ais.org |     TopSoft, BABY!       |
  1097. | Marquette University +---------------------------+--------------------------+ 
  1098. | Computer Engineering |   Jesus Saves...Gretzky steals...Gretzky scores!!!   |
  1099.  
  1100. +++++++++++++++++++++++++++
  1101.  
  1102. From: mxmora@unix.sri.com (Matthew Xavier Mora)
  1103. Date: 5 May 92 00:14:25 GMT
  1104. Organization: SRI International
  1105.  
  1106.  
  1107. In article  Steve Jovanovic, jovanovi@studsys.mscs.mu.edu writes:
  1108.  
  1109. >Does anyone know how the Finder implements iconic views, and
  1110. >allows users to drag icons?  First, does the Finder use 
  1111. >GWorlds to keep track of each window's pixMap, so that fast
  1112. >scrolling is no problem?  Or...does it keep track of the 
  1113. >position of each individual icon, and uses CopyBits() to
  1114. >draw all of the icons in a window?  
  1115.  
  1116. I believe that the finder used to keep track of the icons location
  1117. in the desktop file. It probably still does. I'm sure it does not use any 
  1118. offscreens for drawing since that would take up way too much memory. 
  1119. In scrolling it probably just does a scroll rect and draws (by
  1120. copybitsing)
  1121. the icons that have moved into view. 
  1122.  
  1123. >Related to this is how the Finder can tell when a user has
  1124. >clicked on an icon.  BitMapInRegion()?
  1125.  
  1126. It probably checks the click location with a list of object points. In an
  1127. old
  1128. prototyping program I wrote a long time ago in basic I just kept the
  1129. points
  1130. in an array. When a click happened in the window, I would scan the array
  1131. backwards (because the objects are layered from low to high in the array
  1132. thus the last object brought to the front or newly created would be the
  1133. last
  1134. item in the array) doing a ptinrect test for each object in the array. The
  1135. speed was acceptable in basic so I would imagine would be much better in
  1136. any
  1137. other language. Plus in pascal or c you could use linked lists and such.
  1138. If
  1139. you have a lot of objects you might want to save just a point. If you have
  1140. only a few objects you can keep track of the rect's or Rgn's.
  1141.  
  1142. The finder probably uses ptinrgn instead of ptinrect. Check out the
  1143. *.games.programmer groups for articles on "hit" detection. That would
  1144. probably be faster than the "get points/convertbitmaptorgn/ptinrgn" route.
  1145.  
  1146.  
  1147. - -- 
  1148.  
  1149. - ---------------------------------------------------------------------
  1150. - ------
  1151. |Matthew Mora                                          
  1152. Matt_Mora@QM.sri.com |
  1153. |SRI International                                      
  1154. mxmora@unix.sri.com |
  1155. |"Selling skin, selling god, the numbers look the same on their credit
  1156. card."|
  1157. |                                        "Queensryche - Operation
  1158. Mindcrime" |
  1159.  
  1160. - ---------------------------------------------------------------------
  1161. - ------
  1162.  
  1163. ---------------------------
  1164.  
  1165. End of C.S.M.P. Digest
  1166. **********************
  1167.